package days48;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class day46 {
    public int findMaxLength(int[] nums) {
        Map<Integer,Integer> map = new HashMap<>();
        map.put(0,-1);
        int sum = 0;
        int max = 0;
        for (int i = 0; i < nums.length; i++) {
            if(nums[i] == 1){
                sum += 1;
            }else {
                sum -= 1;
            }
            if(map.containsKey(sum)){
                max = Math.max(max , i - map.get(sum));
            }
            else map.put(sum , i);
        }
        return max;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        int max = 1;
        int k = scanner.nextInt();
        int d = scanner.nextInt();
    }
}
